<?php slot('rightMenuWidget') ?>

<?php foreach($sections as $section): //find active section ?>
	<?php if($helper->active($section) &&
			$section->getNode()->hasChildren() &&
			!$helper->hidden($section) ): ?>

			<?php $params = array( 'p0' => $section['lang'], 'p1' => $section['slug'] ); ?>

		<div class="active_menu_head" style="background: <?php echo CustomizationHelper::dark($section) ?>"><a href="<?php include_component('linker', 'articleLinkBuilder', array( 'params' => $params) )?>" style="background: url(<?php echo CustomizationHelper::smallarrow($section) ?>) no-repeat right center; color: <?php echo CustomizationHelper::font($section) ?>;"><?php echo $section['title'] ?></a></div>
		<div class="active_menu_content" style="background: <?php echo CustomizationHelper::light($section) ?>;">
			<?php include_partial('rightMenuWidget/nested_menu', array('level' => 0,'helper' => $helper, 'items' => $helper->getItemChildren($section, $params),'params' => $params )) ?>
		</div>
	<?php endif; ?>
<?php endforeach; ?>
		
<?php foreach($sections as $section): ?>
	<?php if(!$helper->hidden($section) && !$helper->active($section)): ?>
		<?php $params = array( 'p0' => $section['lang'], 'p1' => $section['slug'] ); ?>
		<div class="inactive_menu_head" style="background: <?php echo CustomizationHelper::dark($section) ?>;"><a href="<?php include_component('linker', 'articleLinkBuilder', array( 'params' => $params) )?>" style="background: url(<?php echo CustomizationHelper::smallarrow($section) ?>) no-repeat right center; color: <?php echo CustomizationHelper::font($section) ?>;"><?php echo $section['title'] ?></a></div>
	<?php endif; ?>
<?php endforeach; ?>
<?php end_slot() ?>